<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
<link rel="stylesheet" href="用户订单信息案例.css">
<style>
      
        table {
               border-collapse:collapse ;
               margin: auto;
               }
        th, td{
               border: 1px solid;
               padding: 4px 10px;
               text-align: center;
              }       
    </style>
</head>
<body>

  <script>
    let price = +prompt('请输入价格')
    let num = +prompt('请输入数量')
    let address = prompt('请输入收获地址')
    let total = price * num
    document.write(`
    <table >
    <caption>  <h2>订单确认</h2></caption>
    <tr>
      <th>商品名称</th>
      <th>商品价格</th>
      <th>商品数量</th>
      <th>总价</th>
      <th>收货地址</th>
    </tr>
    <tr>
      <td>华为mate80</td>
      <td>${price}</td>
      <td>${num}</td>
      <td>${total}</td>
      <td>${address}</td>
    </tr>
  </table>
    `)
  </script>
</body>
</html>